

<fieldset style="text-align:left">
    <legend><?php _resource('add '.$this->params['controller']);?></legend>
<center><div id="message" >&nbsp;</div></center>
<?php if($this->Session->read('message')){
	echo '<script>showMessage("addContent","'.$this->Session->read('message').'");</script>';
	$this->Session->delete('message');	
	}?>
<?php if($this->Session->read('error')){
	echo '<script>showMessage("addContent","'.$this->Session->read('error').'",1);</script>';
	$this->Session->delete('error');
}?>
<?php if(count($data)>0){?>
<table border="0" class="form" style="width:100%">       	
   	<?php foreach($data as $k=>$v){?>
   	<tr>          
       <td class="label" align="right" width="100px"><?php _resource($k) ?></td>
       <td align="left">
       		<?php foreach($v as $k2=>$v2){echo $v2.'<br />';}?>       		
       </td>           
    </tr>
	<?php }?>
</table>
<br />
<br />
<br />
<center>
<?php if($isBuild && $isRebuild){?>
<div style="text-align:center; font-weight: bold">These module are rebuild.</div>
<div style="width:130px">     
	<div class="button"><a onclick="closeBox('addContent')" href="javascript:;" title="<?php echo _resource('close') ?>"  > <span class="icon-32-cancel"> </span></a> </div>
</div>
<?php }else if($isBuild){?>
<div style="text-align:center; font-weight: bold">These module are created.</div>
<div style="width:130px">
	<div class="button"><a onclick="closeBox('addContent')" href="javascript:;" title="<?php echo _resource('close') ?>"  > <span class="icon-32-cancel"> </span></a> </div>
</div>

<?php }else if($isRebuild){?>
<div style="text-align:center; font-weight: bold">These module will be rebuild.</div>
<div style="width:130px">
    <div class="button"><a onclick="ajaxSubmit('addContent','<?php echo $this->params['controller'] ?>/add/1/1');" href="javascript:;" title="<?php echo _resource('save') ?>"  > <span class="icon-32-save"> </span></a> </div>         
	<div class="button"><a onclick="closeBox('addContent','mainContent')" href="javascript:;" title="<?php echo _resource('close') ?>"  > <span class="icon-32-cancel"> </span></a> </div>
</div>
<?php }else{?>
<div style="text-align:center; font-weight: bold">These module will be created.</div>
<div style="width:130px">
    <div class="button"><a onclick="ajaxSubmit('addContent','<?php echo $this->params['controller'] ?>/add/1');" href="javascript:;" title="<?php echo _resource('save') ?>"  > <span class="icon-32-save"> </span></a> </div>         
	<div class="button"><a onclick="closeBox('addContent','mainContent')" href="javascript:;" title="<?php echo _resource('close') ?>"  > <span class="icon-32-cancel"> </span></a> </div>
</div>
<?php }?>
</center>
</fieldset>
<?php }else{?>
	<div style="text-align:center; font-weight: bold">There is no new module added!.</div>
<?php }?>
<script>
	<?php if(isset($isInsert) && $isInsert){
		echo 'ajax("listContent","'.$this->params['controller'].'/lists");';
	}?>	
	scrollTopTo('addContent');		
</script>